package zetcode.basicGraphics;

import java.awt.Graphics;
import java.awt.Graphics2D;

import java.awt.Image;

import javax.swing.ImageIcon;
import javax.swing.JPanel;

@SuppressWarnings("serial")
public class ImagePanel extends JPanel {
	Image lush;
	
	public ImagePanel(){
		ImageIcon ii = new ImageIcon(this.getClass().getResource("/pics/lush.jpg"));
		lush = ii.getImage();
	}
	
	public void Paint(Graphics g){
		super.paint(g);
		Graphics2D g2d = (Graphics2D) g;
		g2d.drawImage(lush, 5, 5, null);
	}
}
